package com.electronic.modules.verify.param;

import com.alibaba.fastjson.JSONObject;
import com.electronic.domain.CebsSdkProperties;
import com.electronic.valid.BeanValidator;
import lombok.Data;

import javax.validation.constraints.NotNull;


/**
 * @Author: IFCA
 * @Description: 获取撤章二维码
 */

@Data
public class CommitVerifySignatureDTO {


    /**
     * 文件路径 path不能为空
     */
    @NotNull(message = "文件路径不能为空")
    private String path;

    public static CommitVerifySignatureDTO parse(String businessData){
        CommitVerifySignatureDTO dto = JSONObject.parseObject(businessData, CommitVerifySignatureDTO.class);
        //验证必填项
        BeanValidator.validateReturnException(dto);
        return dto;
    }
    /**
     * 初始化CA信息
     */
    @NotNull(message = "初始化CA信息不能为空")
    private CebsSdkProperties cebsSdkProperties;

//    /**
//     * 证书链信息
//     */
//    private List<BatchGetCAOrgCertChainInfoResultDTO> certChainInfoList;

    /**
     * 证书链地址
     */
    private String certChainPath;
}
